USE Giars 
GO

DECLARE @username VARCHAR(255);

--SET THE USER NAME BELOW WITHIN '' MARKS
--replace admin with the administrator of this system
--the user name is the same as in AD server
-------------------------------------------------------------------
SET @username = 'admin';
-------------------------------------------------------------------
--NOTE
--this script will configure the first login user for giars
--the only area you can amend is the above user name
--if you don't know T-SQL don't mess up this script

DELETE FROM [Users] WHERE UserName = @username;

INSERT INTO [Users] 
	VALUES('14351319-7F10-4711-B303-A891EE26F0E8',NULL,@username);
INSERT INTO [UsersRights] 
	VALUES('351D9806-6520-4A38-876A-A12AD843B6BF','14351319-7F10-4711-B303-A891EE26F0E8','AccessRecords - Add');
INSERT INTO [UsersRights] 
	VALUES('3B44F5BD-BF6A-41BD-9B9D-F269AF9E4844','14351319-7F10-4711-B303-A891EE26F0E8','AccessRecords - Delete');
INSERT INTO [UsersRights] 
	VALUES('2706D6E0-1C9D-4000-97D3-36130A5F138B','14351319-7F10-4711-B303-A891EE26F0E8','AccessRecords - Edit');
INSERT INTO [UsersRights] 
	VALUES('EA90AA69-42CC-4B9B-BEF0-66F662C61289','14351319-7F10-4711-B303-A891EE26F0E8','AccessRecords - View');
INSERT INTO [UsersRights] 
	VALUES('83282F56-FE58-48B1-962B-7F30F8888BD2','14351319-7F10-4711-B303-A891EE26F0E8','Customers - Add');
INSERT INTO [UsersRights] 
	VALUES('9EAF7F6F-8DD9-49D1-B00A-98069765F7EC','14351319-7F10-4711-B303-A891EE26F0E8','Customers - Delete');
INSERT INTO [UsersRights] 
	VALUES('63634889-E356-4218-A810-3DE56050077D','14351319-7F10-4711-B303-A891EE26F0E8','Customers - Edit');
INSERT INTO [UsersRights] 
	VALUES('70677028-B7B4-46EF-9B44-CFB6315FB047','14351319-7F10-4711-B303-A891EE26F0E8','Customers - View');
INSERT INTO [UsersRights] 
	VALUES('67A41F6D-4246-44CD-A21F-6CE75B48AFF0','14351319-7F10-4711-B303-A891EE26F0E8','Passes - Add');
INSERT INTO [UsersRights] 
	VALUES('51A4841C-1462-40DD-87DF-5549271A94DE','14351319-7F10-4711-B303-A891EE26F0E8','Passes - Authorize');
INSERT INTO [UsersRights] 
	VALUES('9437001F-6E79-45FB-B14D-4BC5DF7C18A9','14351319-7F10-4711-B303-A891EE26F0E8','Passes - Delete');
INSERT INTO [UsersRights] 
	VALUES('3A962367-C61C-4BBE-9DDB-2E584DB70378','14351319-7F10-4711-B303-A891EE26F0E8','Passes - Edit');
INSERT INTO [UsersRights] 
	VALUES('C1EADE33-8EB3-482F-B811-D5E883D880B7','14351319-7F10-4711-B303-A891EE26F0E8','Passes - View');
INSERT INTO [UsersRights] 
	VALUES('E36F52AF-F841-4D7B-AE0C-B11020A1EDCA','14351319-7F10-4711-B303-A891EE26F0E8','Users - Add');
INSERT INTO [UsersRights] 
	VALUES('FF15C5D0-1EC1-4171-A988-3D0516B29AC3','14351319-7F10-4711-B303-A891EE26F0E8','Users - Delete');
INSERT INTO [UsersRights] 
	VALUES('5079FC5D-8986-44DE-93B4-9217F43C3387','14351319-7F10-4711-B303-A891EE26F0E8','Users - Edit');
INSERT INTO [UsersRights] 
	VALUES('3A835B3E-F661-41E8-8C39-A77AADAED89F','14351319-7F10-4711-B303-A891EE26F0E8','Users - View');
INSERT INTO [UsersRights] 
	VALUES('47F0A66B-82FB-4E83-A1EE-00735DE050A9','14351319-7F10-4711-B303-A891EE26F0E8','AccessRecords');
INSERT INTO [UsersRights] 
	VALUES('1BC8842B-31B3-4703-8E5B-D2D8793F53E1','14351319-7F10-4711-B303-A891EE26F0E8','Log');
GO

